/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package cp2004;

import java.util.ArrayList;
/**
 *
 * @author NC10
 */
public class itemArr extends ArrayList <item>
{
    public itemArr(){
item i = new item();
i.setInfo("a Item of car");
i.setName("Valve");
i.setNum(1);
add(i);

i=new item();
i.setInfo("a Item of car");
i.setName("Over Head Camshaft");
i.setNum(2);
add(i);

i=new item();
i.setInfo("a Item of car");
i.setName("Cylinder Block");
i.setNum(3);
add(i);

i=new item();
i.setInfo("a Item of car");
i.setName("Crank Shaft");
i.setNum(4);
add(i);

i=new item();
i.setInfo("a Item of car");
i.setName(" Intake Valve");
i.setNum(5);
add(i);

i=new item();
i.setInfo("a Item of car");
i.setName("Camshaft");
i.setNum(6);
add(i);

i=new item();
i.setInfo("a Item of car");
i.setName(" Fuel Pump");
i.setNum(7);
add(i);
}
    public String toString(){
  String res="";
  for (int i = 0;i < size();i++){
  item p= get(i);
  res=res + p + "/n";
  }
  return res;
  }
}